import AppManger from './appmanger';
import config from '../manger/config.json';

// const config = require('../manger/config.json')
const formalHost = 'https://abouti.top';
const host =
  config.HostType == 0 ? 'http://localhost:4000/app' : 'https://abouti.top/app';
const fileHost = 'https://file.abouti.top'; // AppManger.isDebug ? "http://localhost:4000/app"

const PublishApi = {
  getAppList: host + '/appList',
  uploadFile: host + '/uploadFile',
  uploadFiles: host + '/uploadFiles',
  submitApp: host + '/submitApp',
  removeApp: host + '/removeApp',
  installH5: host + '/install',
};

export const FileApi = (key: string) => fileHost + '/' + key;
export const ShareUrl = formalHost + '/install'; // PublishApi.installH5

export default PublishApi;
